package com.examlpe.rabbitmqdome.listener;

import com.examlpe.rabbitmqdome.constant.Contants;
import org.apache.logging.log4j.message.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;
import org.yaml.snakeyaml.scanner.Constant;

import java.nio.channels.Channel;

@Component
public class WorkLister {
    @RabbitListener(queues = Contants.WORK_QUEUE)
    public void queueLister1(String message) {
        System.out.println("lister 1 [" + Contants.WORK_QUEUE+"]接收的消息: " +message);
    }

}
